<template>
    <div class="bgfff">
        <div class="w100p disflex pl16 pr21 jusbet pt4 lh53 bbeee title">
            <span class="postionre c333 fs20">
                <i v-html="datas.name + infotext || ''"></i>
                <i :class="datas.tips" v-if="datas.tips"></i>
            </span>
            <div class="clearfix" :class="istags && datas.type ? 'media_w100p' : ''">
                <span class="fs12 c999 curpointer fr hoverred" @click="changerouter(0,'more')">更多></span>
                <div v-if="istags && datas.type" class="clearfix pr30 fr pt10">
                    <span v-for="(v,k) in datas.type"
                          v-html="v.name"
                          class="pl8 pr7 lh30 fs14 mr10 curpointer boradius1 disblock fl "
                          @click="colomnTagsTap(k)"
                          :class="activetagid == k ? 'bgred cfff' : 'bge5 c333 hoverred' "></span>
                </div>
            </div>
        </div>
        <div class="disflex jusbet " :class="[size == 'small' ? 'pt20' : '' , isbanner? 'pl18 pr32' : '' ]">
            <!--banner-->
            <a  class="w32_6p h152 disblock" target="_blank" v-if="isbanner" :href="datas.link">
                <img :src="bannerUrl || defaultUrl" alt=" " class="w100p h100p disblock ">
            </a>
            <ul :class="[isbanner ? 'w66p' : 'w100p',pb]"><!-- :class="size == 'big' ? 'lh56' : 'lh40' "-->
                <li class="clearfix pl18 pr27 bbdasheee  fs14 c333 postionre curpointer lh40"
                    v-for="(v,k) in datas.datas"
                    @click="changerouter(v.id,'single')">
                    <div class="pr120 overell hoverred" v-html="'>'+v.post_title" :title="v.post_title"></div>
                    <div class="fr fs12 postionab right0 top0 time" v-html="v.post_modified" :class="isbanner? '' : 'right27' "></div>
                </li>
            </ul>
        </div>

    </div>
</template>

<script>
    export default {
        name: "Column",
        props:['datas','size','isbanner','istags','activetagid','pb','bannerUrl','infotext'],
        data(){
            return{
                msg:'',
                defaultUrl:require('./../../assets/img/zstp1.png')
            }
        },
        methods:{
            colomnTagsTap(index){
                // console.log(this.datas.tags);
                this.$emit('colomnTagsTap',index)
            },
            changerouter(single,action){
                var parentid = 0 ,
                    term_id = 0;
                if(this.istags){
                    parentid = this.datas.term_id ;
                    if(this.datas.type){
                        term_id = this.datas.type[this.activetagid].term_id;
                    }else{
                        term_id = 0;
                    }
                }else{
                    parentid = this.datas.parent;
                    term_id = this.datas.term_id;
                }
                this.$emit('changerouter',parentid,term_id,single,action,0)
            }
        }
    }
</script>

<style>
    .h152 .el-carousel__container{
        height: 100%;
    }
    .h152 .el-carousel__indicators{
        display: none;
    }
    .column .el-carousel__arrow--left{
        left: 0;
    }
    .column .el-carousel__arrow--right{
        right: 0;
    }
    .column .el-carousel__arrow{
        background: rgba(191,0,14,.3);
    }
    .column .el-carousel__arrow:hover{
        background: rgba(191,0,14,.7);
    }

</style>




















